<?php echo $this->doctype; ?>
<html xmlns="http://www.w3.org/1999/xhtml" lang="<?php echo $this->language; ?>">
<head>
<title><?php echo $this->pageTitle; ?> - <?php echo $this->mainTitle; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $this->charset; ?>" />
<meta name="description" content="<?php echo $this->description; ?>" />
<meta name="keywords" content="<?php echo $this->keywords; ?>" />
<?php echo $this->robots; ?>
<link rel="Shortcut Icon" href="images/en/favicon.ico" type="image/x-icon" />
<link rel="Bookmark" href="/favicon.ico" type="image/x-icon" />
<link href="css/style.css" rel="stylesheet" type="text/css" />
<?php echo $this->stylesheets; ?>
<script type="text/javascript" src="js/jquery-1.2.6.pack.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.6.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.pager.js"></script>
<script type="text/javascript">
var pageTotalNum;
var listModel;
var searchFlag;
pageTotalNum = "<?php require_once('getPager.php'); ?>";
listModel = <?php require_once('getListModel.php'); ?>;
searchFlag = <?php require_once('getSearchFlag.php'); ?>;

$(function(){alert('xxxxxxxxxxx');
// Pager
$("#Pagination").pager({ pagenumber: 1, pagecount: pageTotalNum, buttonClickCallback: PageClick });
$("#Pagination2").pager({ pagenumber: 1, pagecount: pageTotalNum, buttonClickCallback: PageClick });

if (pageTotalNum <= 8)
{
	$(".pagination").hide();
}
else
{
	$(".pagination").show();
}

// Accordion
$("#accordion").accordion({ 
	header: "dt",
	autoHeight: false,
	active: listModel
});

});

PageClick = function(pageclickednumber) {
	//alert( "hello world" );
	$("#Pagination").pager({ pagenumber: pageclickednumber, pagecount: pageTotalNum, buttonClickCallback: PageClick });
	$("#Pagination2").pager({ pagenumber: pageclickednumber, pagecount: pageTotalNum, buttonClickCallback: PageClick });
	$.ajax({
		type: "POST",
		url:  "getProductList.php",
		data: "pageNum="+pageclickednumber,
		success: function(msg){ 
			var strHtml = "";
			
			if (msg != undefined && msg != "")
			strHtml = msg;
			//alert(strHtml);
			$("#productList").html(strHtml);
		}
	});
}
</script>
<?php echo $this->head; ?>
</head>

<body id="home">
<div class="container">

<div id="header">
<?php echo $this->header; ?>
</div>

<div class="wrap">

<div class="left">
<?php echo $this->left; ?>
</div>

<div class="main">
<?php echo $this->main; ?>
</div>

<div class="right_side right">
<?php echo $this->right; ?>
</div>
</div>

<div id="footer">
<?php echo $this->footer; ?> 
</div>

</div>
</body>
</html>


